package cn.edu.zzuli.nothinglink.service;

import cn.edu.zzuli.nothinglink.entity.LiveInfo;
import cn.edu.zzuli.nothinglink.entity.R;
import cn.edu.zzuli.nothinglink.entity.SrsCallBackData;
import cn.edu.zzuli.nothinglink.vo.LiveInitInfoVo;
import cn.edu.zzuli.nothinglink.vo.StartLiveVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author suzyyy
 * @since 2021-04-08
 */
public interface LiveInfoService extends IService<LiveInfo> {

    R createLiveRoom2TheTeaId(Integer teaId);

    LiveInitInfoVo getInitInfo(Integer teaId);

    boolean startLiveAndSetLiveInfo(Integer teaId, StartLiveVo vo);

    Integer onConnect(SrsCallBackData callBackData);

    Integer onPublish(SrsCallBackData callBackData);

    Integer onClose(SrsCallBackData callBackData);

    boolean stopLiveAndRemoveKeyFromRedis(String stream);

    R getTheCourseLiveIsStart(Integer courseId, String stream);
}
